package ocr;

import java.io.FileNotFoundException;
import java.util.Arrays;
import java.util.List;

import javax.script.Invocable;
import javax.script.ScriptException;

import com.shareit.ocr.domain.JavaScriptEval;
import com.shareit.ocr.domain.template.InvoiceDataTemplate;
import com.shareit.ocr.domain.template.InvoiceDataTemplateFactory;

/**
 * Created by geai on 2018-01-21.
 */
public class test {

    public static void main(String[] args) throws NoSuchMethodException, ScriptException, FileNotFoundException {
       
//    	String key2="1○北京前景视讯信息咨询有限公司○N○20170717○91110000600041252F○中国工商银行北京燕莎支行 0200012709024258802○9111010875454520X1○北京市海淀区首都体育馆南路6号3号楼15层1551室010-68492566○499909907304○北京银行西客站支行01090336200120105184683○77922.0○○ ○0○北京市朝阳区东三环北路5号北京发展大厦18层 010-65908111○日立（中国）有限公司○3582.38○73461.62";
//    	int i=0;
//    	for(String s:Arrays.asList(key2.split("○"))) {
//    		System.out.println(i++ + "->" + s);
//    	}
    	String jym = "1234";
    	System.out.println(jym.length() > 6?jym.substring(jym.length() -6):jym);
    	
//    	System.out.println(System.getProperty("user.dir"));
//    	String fpdm = "3100171320";
//    	String fphm = "13026029";
//    	String province = "上海";
//    	String result = "{\"template\":0,\"fplx\":fplx,\"fpxx\":fpxx,\"hwxx\":hwxx,\"jmbz\":jmbz,\"sort\":jmsort}";
//    	String data = "{\"key1\":\"001\",\"key2\":\"N○上海市四川北路2066号 021-56667493○34○○423101097878121505○021716-工行上海市四平支行1001171609200062816○ ○ ○66994005241344302399○ ○8722.0○○8722.0○ ○王奕文○上海市民办新复兴初级中学○-878.0○661613531398\",\"key3\":\"学▽费▽█ █学期█1█9500█9500█0█0○代▽办▽费▽█ █学期█1█100█100█0█0\",\"key4\":\"sfxlsI4FTKAdpGPVz/PpvkFmu86jwzluv3RGgyNmMx0=\",\"key5\":\"var fpxx=fpdm+'≡'+fphm+'≡'+swjgmc+'≡'+jsonData.key2+'≡'+yzmSj\",\"key6\":\"\",\"key7\":\"f2ba81f88ec903c1c89faa4bde23d9ba\",\"key8\":\"c0d451bbed678c26f76c23b1b475b5aa\",\"key9\":\"2f281b2112f3407e8f13dc1fbec3ec3c\",\"key10\":\"CmXkYuhAUYaW35/Y/1aiHARzXngYbwcnV9xFPXgZftPYmcIv+kazJ7yJjlmz27ys\",\"key11\":\"1ca36\",\"key12\":\"\"}";
//    	System.out.println(data);
//    	System.out.println(result);
//    	JavaScriptEval eval = new JavaScriptEval();
//    	Invocable invocable = (Invocable)eval.invocable;
//    	System.out.println((String)invocable.invokeFunction("NoToChinese","890.89","04"));
//    	System.out.println((String)invocable.invokeFunction("getje","-799.7","878"));
    	
//    	String rule = "○☺5>4☺878☺-25☺▽";
//    	for(String s:rule.split("☺")) {
//    		System.out.println(s);
//    	}
    	
//    	String info="餐▽费▽█ █ █ █ █78.3█6█4.7";
//    	InvoiceDataTemplate template = InvoiceDataTemplateFactory.createInstance_04();
//    	List<String> ls = Arrays.asList(info.split(template.getItems().getSplitChar()));
//    	template.getItems().setItemsData(ls);
//    	System.out.println(template);
    			
    }
}
